package com.xuyuan.designmode.singleton;

/**
 * 懒汉模式：双重检测，线程安全
 */
public class Signleton3 {
    private static Signleton3 INSTANCE;

    private Signleton3() {
    }

    public static Signleton3 getINSTANCE() {
        if (INSTANCE == null) {
            synchronized (Signleton3.class) {
                if (INSTANCE == null) {
                    INSTANCE = new Signleton3();
                }
            }
        }
        return INSTANCE;
    }
}